def sign(num):
    """
    takes a numerical argument and
    returns -1 if it's negative,
    1 if it's positive,
    and 0 if it's 0.
    >>> sign(5)
    1
    """
    if num < 0:
        return -1
    elif num > 0:
        return 1
    else:
        return 0


help(sign)
print(sign(-1))


def to_smash(total_candies):
    """Return the number of leftover candies that must be smashed after distributing
    the given number of candies evenly between 3 friends.

    # >>> to_smash(91)
    # 1
    """
    # print("Splitting" + total_candies + right_grammar(total_candies),
    #       "Splitting" + total_candies + "candy" if total_candies == 1 else "candies",
    #       sep="/n")

    if total_candies == 1:
        print("Splitting 1 candy")
    else:
        print("Splitting", total_candies, "candies")

    print("Splitting", total_candies, "candy" if total_candies == 1 else "candies")
    return total_candies % 3


def right_grammar(candy_number):
    if candy_number > 1:
        return "candies"
    else:
        return "candy"


to_smash(91)
to_smash(1)


def is_negative(number):
    if number < 0:
        return True
    else:
        return False


def concise_is_negative(number):
    return True if number < 0 else False


def exactly_one_sauce(ketchup, mustard, onion):
    """
    Return whether the customer wants either ketchup or mustard, but not both.
    (You may be familiar with this operation under the name "exclusive or")
    """
    return (ketchup and not mustard) or (mustard and not ketchup)


def exactly_one_topping(ketchup, mustard, onion):
    """Return whether the customer wants exactly one of the three available toppings
    on their hot dog.
    """
    sum_boolean = int(ketchup) + int(mustard) + int(onion)
    return True if sum_boolean == 1 else False
    # return (int(ketchup) + int(mustard) + int(onion)) == 1
    # return (ketchup + mustard + onion) == 1
